<form class="form-signin" role="form" method="post" action="<?=site_url('storagemanage/addproduct') ?>">
	<p><button type="submit" name="addProductBtn" value="add-all" class="btn btn-primary">Tạo sản phẩm</button></p>
</form>
<div class="table-responsive">
	<table class="table table-bordered">
		<thead>
			<tr class="success" align="center">
				<td>Sản phẩm</td>								
				<td>Màu</td>																	
				<td>xs</td>																						
				<td>s</td>										
				<td>m</td>										
				<td>l</td>										
				<td>xl</td>	
				<td>xxl</td>
				<td>xxxl</td>										
				<td>Tổng</td>										
			</tr>
		</thead>
		<tbody>
			<?php	
				$i = 1;			
				foreach ($product_infos as $product):	
				$total = $product['xs'] + $product['s'] + $product['m'] + $product['l'] + $product['xl'] + $product['xxl'] + $product['xxxl'];
				$tr_class = ($total == 0) ? "class='danger'" : "";
					echo '<tr align="center" '.$tr_class.'>
							<td>'.$product['title'].'</td>																		
							<td>'.$product['color'].'</td>														
							<td>'.$product['xs'].'</td>							
							<td>'.$product['s'].'</td>
							<td>'.$product['m'].'</td>
							<td>'.$product['l'].'</td>		
							<td>'.$product['xl'].'</td>					
							<td>'.$product['xxl'].'</td>							
							<td>'.$product['xxxl'].'</td>
							<td>'.$total.'</td>
						  </tr>';						  					
					$i++;
				endforeach;
			?>
		</tbody>
	</table>
	<?=isset($paging_products) ? "<div class='pull-right'><span>Tổng cộng: $total_products sản phẩm</span><br>".$paging_products."</div>" : "" ?>
</div>